{extend name="base/common"}

{block name="style"}
<link rel="stylesheet" href="__STATIC__/datepicker/bootstrap-datetimepicker.min.css">
<link rel="stylesheet" href="__STATIC__/iCheck/custom.css">
<link rel="stylesheet" href="__ADMIN__/css/chosen/chosen.css">
{/block}

{block name="page-header"}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>课表管理</h2>
        <ol class="breadcrumb">
            <li>
                <a href="{:Url('Course/index')}">首页</a>
            </li>
            <li class="active">
                <strong>查看详情</strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2">

    </div>
</div>
{/block}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>课表内容</h5>
                    <div class="ibox-tools">
                        <a data-toggle="modal" class="btn btn-sm btn-primary" href="{:Url('Course/edit?id='.$id)}">修改</a>
                        <a href="javascript:window.history.go(-1);" class="btn btn-white btn-sm"><i class="fa fa-reply"></i> 返回</a>
                    </div>
                </div>
                <div class="ibox-content all">
                    <form id="form" class="form-horizontal" method="post">
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>课表编码:</label>
                            </div>
                            <div class="col-lg-11">
                                <input type="text" style="color: green;font-weight: bolder;font-size: 20px" class="form-control form_title" value="{$msg.order || default='暂无'}" disabled>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>国家:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="country" id="type"  class="form-control country" disabled>
                                    <option >{$msg.country || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>省份:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="city" id="type"  class="form-control city" disabled>
                                    <option>{$msg.city || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>分校:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="place" id="type"  class="form-control place" disabled>
                                    <option >{$msg.place || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>学历:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="education" id="type"  class="form-control education" disabled>
                                    <option>{$msg.education || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>课程名称:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="name" id="type"  class="form-control name" disabled>
                                    <option>{$msg.name||default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>项目:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="project" id="type"  class="form-control project" disabled>
                                    <option>{$msg.project_name || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>科目:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="subject" id="type"  class="form-control project" disabled>
                                    <option>{$msg.subject || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>辅导阶段:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="stage" id="type"  class="form-control stage" disabled>
                                    <option>{$msg.stage_name || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>模块:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="module" id="type"  class="form-control stage" disabled>
                                    <option>{$msg.module || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>课次:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="time" id="type"  class="form-control stage" disabled>
                                    <option>{$msg.time_name || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>班型:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="class" id="type"   class="form-control class" disabled>
                                    <option value="0" >{$msg.class}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>授课老师:</label>
                            </div>
                            <div class="col-lg-11">
                                <select name="teacher" id="type"  class="form-control stage" disabled>
                                    <option>{$msg.teacher || default='暂无'}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>授课学校:</label>
                            </div>
                            <div class="col-lg-11 school">
                                <select name="school" id="type"  class="chosen-select form-control" data-placeholder="--请选择--" multiple disabled>
                                     {volist name="$msg.school_id" id="ss"}
                                    <option value="0" {eq name="$ss" value="0"} selected {/eq}>点对点总部</option>
                                    {volist name="school" id="gg"}
                                    <option value="{$gg.dx_id}" {eq name="$ss" value="$gg.dx_id"} selected {/eq}>{$gg.dx|iconv="gbk", "utf-8//ignore", ###}</option>
                                    {/volist}
                                    {/volist}
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>授课地点:</label>
                            </div>
                            <div class="col-lg-11">
                                <input type="text" placeholder="请输入授课地点" class="form-control form_title" name="address" value="{$msg.address || default='暂无'}" disabled>
                            </div>
                        </div>
                        <div class="form-group" id="timeRange">
                            <div class="col-lg-1 text-right control-label">
                                <label>上课时间:</label>
                            </div>
                            <div class="col-lg-11">
                                <div class="date">
                                    <input type="text" style="width: 40%;float: left;margin-right: 50px" placeholder="请输入开始时间" class="form-control datetimepicker" name="start_time"  value="{$msg.start_time|time_format='Y-m-d H:i'}" disabled/>
                                    <input type="text" style="width: 40%" placeholder="请输入结束时间" class="form-control datetimepicker" name="end_time"  value="{$msg.end_time|time_format='Y-m-d H:i'}" disabled/>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 control-label">
                                <label>授课内容:</label>
                            </div>
                            <div class="col-lg-11">
                                <textarea rows="6" cols="150" name="content" disabled>{$msg.content || default=''}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-1 text-right control-label">
                                <label>是否领资料:</label>
                            </div>
                            <div class="col-lg-11">
                                {eq name="msg.receive" value="1"}
                                <label class="i-checks" >
                                    <input type="radio" value="1" name="receive" checked>是
                                </label>
                                {/eq}
                                {eq name="msg.receive" value="0"}
                                <label class="i-checks" >
                                    <input type="radio" value="0" name="receive" checked>否
                                </label>
                                {/eq}
                            </div>
                        </div>
                        <input type="hidden" name="id" value="{$msg.id || default=''}">
                        <div class="form-group">
                            <div class="col-lg-11 col-lg-offset-1">
                                <a class="btn btn-default" href="javascript:window.history.go(-1);">返回</a>
                            </div>
                        </div>
                        <div class="selblo"></div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script src="__STATIC__/datepicker/bootstrap-datetimepicker.js"></script>
<script src="__STATIC__/iCheck/icheck.min.js"></script>
<script src="__ADMIN__/js/chosen.jquery.js"></script>
<script>
    $(function(){
        //    单选按钮
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green'
        });
        highlight_subnav("{:Url('Course/index')}");
        //多选框
        $(".school select" ).chosen({
            no_results_text: "没有找到该选项",
            allow_single_de: true,
            width:'100%',
            max_selected_options:'10'
        });
        selHeight($('.school select'));
        function selHeight(e){
            e.find('ul').on('click',function(){
                var results = $(this ).next().find('.chosen-results' );
                var h= results.height();
                h=h-100;
                $('.selblo' ).animate({'height':h+'px'},100);
                //切出页面
                var hiddenProperty = 'hidden' in document ? 'hidden' :
                        'webkitHidden' in document ? 'webkitHidden' :
                                null;
                var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
                var onVisibilityChange = function(){
                    if (!document[hiddenProperty]) {
                        //selgp.find('.search-field').find('input').on('blur');
                    }else{
                        e.find('.search-field').find('input').off('blur');
                    }
                };
                $(document).on(visibilityChangeEvent, onVisibilityChange);
            });
            e.find('.search-field').find('input').on('blur',function(){
                setTimeout(function(){
                    $('.selblo' ).animate({'height':'0'});
                },100)
            });
        }
    })

</script>
{/block}